﻿using EasyModbus;

namespace testfactoryio
{
    internal class Program
    {
        static void Main(string[] args)
        {

            ModbusClient modbusClient = new ModbusClient("192.168.1.136", 502);
            modbusClient.Connect();
            if (modbusClient.Connected)
            {
                Console.WriteLine("Connected to Modbus Server");
            }
            modbusClient.WriteSingleCoil(0, false);
            modbusClient.WriteSingleCoil(1, false);

            Console.WriteLine("Hello, World!");

            吃饭();
        }

        static void 吃饭()
        {
            Console.WriteLine("吃饭了");
        }

    }
}
